//
//  ReportPriceContentView.m
//  WorkNest
//
//  Created by qbm360 on 15/8/14.
//  Copyright (c) 2015年 nest. All rights reserved.
//

#import "ReportPriceContentView.h"

@interface ReportPriceContentView ()

@property (strong, nonatomic) IBOutlet UIView *view;
@property (weak, nonatomic) IBOutlet UIView *view1;
@property (weak, nonatomic) IBOutlet UILabel *explain;
@property (weak, nonatomic) IBOutlet UILabel *price;
@property (weak, nonatomic) IBOutlet UILabel *explainContent;
@property (weak, nonatomic) IBOutlet UILabel *priceContent;

@end

@implementation ReportPriceContentView

- (id)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        [self setup];
    }
    return self;
}

- (id)initWithCoder:(NSCoder *)aDecoder
{
    self = [super initWithCoder:aDecoder];
    if(self) {
        [self setup];
    }
    return self;
}

- (void)setup
{
    [[NSBundle mainBundle] loadNibNamed:@"ReportPriceContentView" owner:self options:nil];
    _view.frame = self.bounds;
    [self addSubview:_view];
    _view1.layer.masksToBounds = YES;
    _view1.layer.cornerRadius = 6.0;
    _view1.layer.borderWidth = 1;
    _view1.layer.borderColor = [[UIUtil colorWithHexString:@"#bdbaba"] CGColor];
}

- (void)setModel:(QueryQuoteModel *)model {
    _model = model;
    self.explain.text = self.iffabric?@"面料说明":@"辅料说明";
    self.explainContent.text = self.iffabric?_model.fabric:_model.accessory;
    self.priceContent.text = self.iffabric?_model.fabricCost:_model.accessoryCost;
}

@end
